package vip.liux.contracts.models.pay;

import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import vip.liux.contracts.shared.enums.pay.PayDemoWithdrawStatus;
import vip.liux.contracts.shared.enums.pay.PayDemoWithdrawType;
import vip.liux.domain.entities.auditing.CreationAuditedEntity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Getter
@Setter
@Entity
@Table(name = "pay_demo_withdraw")
@Accessors(chain = true)
public class PayDemoWithdraw extends CreationAuditedEntity<Long> {
    /**
     * 提现标题
     */
    private String subject;
    /**
     * 提现金额，单位：分
     */
    private BigDecimal price;

    /**
     * 收款人账号
     */
    private String userAccount;
    /**
     * 收款人姓名
     */
    private String userName;

    /**
     * 提现方式
     * <p>
     * 枚举 {@link PayDemoWithdrawType}
     */
    private PayDemoWithdrawType type;
    /**
     * 提现状态
     * <p>
     * 枚举 {@link PayDemoWithdrawStatus}
     */
    private PayDemoWithdrawStatus status;

    // ========== 转账相关字段 ==========

    /**
     * 转账单编号
     * <p>
     * 关联 {@link PayTransfer#getTransferNo()}
     */
    private String payTransferNo;
    /**
     * 转账渠道
     * <p>
     * 枚举 {@link PayChannel}
     */
    private String transferChannelCode;
    /**
     * 转账成功时间
     */
    private LocalDateTime transferTime;
    /**
     * 转账错误提示
     */
    private String transferErrorMsg;
}
